- return unless render_setting_to_allow_project_access_token_creation?(group)

- project_access_tokens_link = help_page_path('user/project/settings/project_access_tokens.md')
- group_access_tokens_link = help_page_path('user/group/settings/group_access_tokens.md')
- link_start_project = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: project_access_tokens_link }
- link_start_group = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: group_access_tokens_link }

.form-group.gl-mb-3
  = f.label :resource_access_token_creation_allowed, _('Allow group and project access tokens')
  = f.gitlab_ui_checkbox_component :resource_access_token_creation_allowed,
    s_('GroupSettings|Users can create %{link_start_group}group access tokens%{link_end} and %{link_start_project}project access tokens%{link_end} in this group').html_safe % { link_start_project: link_start_project, link_start_group: link_start_group, link_end: '</a>'.html_safe },
    checkbox_options: { checked: group.namespace_settings.resource_access_token_creation_allowed? }
